package com.doyens.common;

public class BaseContext {
    /**
     * 工具类，基于ThreadLocal类封装的工具类
     */
    private static ThreadLocal<Integer> threadLocal = new ThreadLocal<>();

    //set和get方法设置当前用户的id，get方法获取当前用户的id
    public static void setCurrId(Integer id){
        threadLocal.set(id);
    }

    public static Integer getCurrId(){
        return threadLocal.get();
    }
}
